import request from '@/utils/request'

// 查询门窗详细信息列表
export function listWindows(query) {
  return request({
    url: '/material-cutting-plan/windows/list',
    method: 'get',
    params: query
  })
}

// 查询门窗详细信息详细
export function getWindows(id) {
  return request({
    url: '/material-cutting-plan/windows/' + id,
    method: 'get'
  })
}

// 新增门窗详细信息
export function addWindows(data) {
  return request({
    url: '/material-cutting-plan/windows',
    method: 'post',
    data: data
  })
}

// 修改门窗详细信息
export function updateWindows(data) {
  return request({
    url: '/material-cutting-plan/windows',
    method: 'put',
    data: data
  })
}

// 删除门窗详细信息
export function delWindows(id) {
  return request({
    url: '/material-cutting-plan/windows/' + id,
    method: 'delete'
  })
}
// 计算门窗下料
export function calculate(id) {
  return request({
    url: '/material-cutting-plan/windows/calculate/' + id,
    method: 'get'
  })
}
